var deleteDuplicates = function(head) {
    if(!head) return head
    let res = head
    while(head.next){
        if(head.val=head.next.val){
            head.next = head.next.next
        }
        head = head.next
    }
}